var windowName = "myTask";
var Page ,List
apiready = function(){
    onWindowHide(function () {
    })
    onWindowShow(function () {
        getData()
    })
    List = new List();
    Page = createVM("#Page",{
        //页面数据
        curTab:0,
        list:[],
        loading:true
    },{
        //页面方法
        "init":function () {
            // var data =getData4Page()
            // console.log(data.text);

        }
        ,tab:function (index) {
            Page.curTab = index
        }
        ,"OnPullUpLoadMore":function () {
            // startPullUpLoadMore();
            // LiveList.getList()
        }

    })

    Page.init()
}

function getData() {
    apiGet("/app/user/task",{},function (res , code) {
        clearLoading();
        logJson(res.data,"data_:")
        if (code == 200){
            Page.list = res.data
        }else {
            showToast(code)
        }

    })
}
